package com.easyweb.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.validator.Length;
import org.hibernate.validator.Max;
import org.hibernate.validator.NotNull;

@Entity
@Table
public class KullaniciReferans implements Serializable {

 
	private static final long serialVersionUID = 4487744208707583795L;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(unique = true, nullable = false)
	 private long id;
	
	@ManyToOne
	private Kullanici kullanici;
	
	@Column(nullable=false)
	@NotNull(message="#{messages.errBosOlamaz}")
	private String firmaAdi;
	
	@Column(nullable=false,length=50)
	@NotNull(message="#{messages.errBosOlamaz}")
	@Length(max=50,message="#{messages.errUzunlukElliGecemez}")
	private String adSoyad;
	
	@ManyToOne
	@NotNull(message="#{messages.errBosOlamaz}")
	private PozisyonBilgileri gorevi;
	
	@Column(nullable=false,length=5)
	@NotNull(message="#{messages.errBosOlamaz}")
	@Length(message="#{messages.errUzunlukBesGecemez}")
	private String telUlkeKodu;
	
	@Column(nullable=false,length=10)
	@NotNull(message="#{messages.errBosOlamaz}")
	@Length(message="#{messages.errUzunlukOnGecemez}")
	private String telNumarasi;
	
 public KullaniciReferans() {
	// TODO Auto-generated constructor stub
}

public KullaniciReferans(long id, Kullanici kullanici, String firmaAdi,
		String adSoyad, PozisyonBilgileri gorevi, String telUlkeKodu,
		String telNumarasi) {
	super();
	this.id = id;
	this.kullanici = kullanici;
	this.firmaAdi = firmaAdi;
	this.adSoyad = adSoyad;
	this.gorevi = gorevi;
	this.telUlkeKodu = telUlkeKodu;
	this.telNumarasi = telNumarasi;
}

public static long getSerialversionuid() {
	return serialVersionUID;
}

public long getId() {
	return id;
}

public Kullanici getKullanici() {
	return kullanici;
}

public String getFirmaAdi() {
	return firmaAdi;
}

public String getAdSoyad() {
	return adSoyad;
}

public PozisyonBilgileri getGorevi() {
	return gorevi;
}

public String getTelUlkeKodu() {
	return telUlkeKodu;
}

public String getTelNumarasi() {
	return telNumarasi;
}

public void setId(long id) {
	this.id = id;
}

public void setKullanici(Kullanici kullanici) {
	this.kullanici = kullanici;
}

public void setFirmaAdi(String firmaAdi) {
	this.firmaAdi = firmaAdi;
}

public void setAdSoyad(String adSoyad) {
	this.adSoyad = adSoyad;
}

public void setGorevi(PozisyonBilgileri gorevi) {
	this.gorevi = gorevi;
}

public void setTelUlkeKodu(String telUlkeKodu) {
	this.telUlkeKodu = telUlkeKodu;
}

public void setTelNumarasi(String telNumarasi) {
	this.telNumarasi = telNumarasi;
}
 

 
	
}
